package meihua.mylibrary.basebean;

import java.io.Serializable;

/**
 * Name: 杜志斌
 * Time: 2017/5/4.
 * Dec:
 */
public class ResultModel<T> extends BaseResult implements Serializable {

    T data;

    public ResultModel() {
        super();
    }

//    public ResultModel(T data) {
//        setSuccData(data);
//    }

//    public ResultModel(String errorInfo) {
//        setErrorInfo(errorInfo);
//    }

    public T getData() {
        return data;
    }

    public ResultModel<T> setData(T data) {
        this.data = data;
        return this;
    }

//    protected ResultModel<T> setSuccData(T data) {
//        return ((ResultModel<T>)setCode(SUCCESS)).setData(data);
//    }


    @Override
    public String toString() {
        return "ResultModel{" +
                "data=" + data +
                '}';
    }
}